<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			#container{
				border:1px solid #000;
			}
			.div1,.div2,.div3,.div4{
				width:300px;
				height:50px;
			}
			.div1{
				background:red;
				float:left;
			}
			.div2{
			background:blue;
			float:left;
			clear:right;
			}
			.div3{
				background:green;
				float:left;
			}
			.div4{
				background:cyan;
				float:left;
			}
			.clr{
				clear:both;
			}
		</style>
	</head>
	<body>
		<div id="container">
			<div class="div1">div1</div>
			<div class="div2">div2</div>
			<div class="div3">div3</div>
			<div class="div4">div4</div>
			<div class="clr"></div>
		</div>
	</body>
</html>
